name: main
run-name: ${{ github.actor }} is learning GitHub Actions
on:
  push:
    branches: [main]
  pull_request:
    branches: [main]
jobs:
  pipeline:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        node-version: [21.x]

    steps:
      - uses: actions/checkout@v2
      - name: Staring Node.js ${{ matrix.node-version }}
        uses: actions/setup-node@v1
        with:
          node-version: ${{ matrix.node-version }}

      - name: install modules
        run: npm ci

      - name: build production project
        run: npm run build:prod
        if: always()
      - name: linting scss
        run: npm run lint:scss
        if: always()

      - name: unit testing
        run: npm run test:unit
        if: always()

      - name: build storybook
        run: npm run storybook:build
        if: always()
